#include <iostream>
#include <iomanip>
#include <string>
#include <sstream>
using namespace std;
class HugeInteger
{
    public:
        string content;
        HugeInteger();
        HugeInteger(int a);
        HugeInteger(string a);
};
HugeInteger::HugeInteger()
{
    content = "0";
}
HugeInteger::HugeInteger(int a)
{
    stringstream ss;
    ss << a;
    ss >> content;
}

HugeInteger::HugeInteger(string a)
{
    content = a;
}
HugeInteger operator+(HugeInteger h1, HugeInteger h2)
{
    
    //准备 c = a + b
    int l1 = h1.content.length();
    int l2 = h2.content.length();
    int slen = l1>l2 ? l1 : l2;
    string a,b,c;
    //两个数对齐
    stringstream ss1;
    ss1 << setw(slen) <<setfill('0')<< h1.content;
    ss1>>a;
    stringstream ss2;
    ss2<<setw(slen)<<setfill('0')<<h2.content;
    ss2>>b;
    
    int carry = 0;
    for(int i = slen -1; i >= 0; i--)
    {
        int sum = a[i]-'0' + b[i] -'0' + carry;
        string s(1,(char)((sum%10) + '0'));
        c =  s + c; 
        carry = sum / 10;
    }
    if(carry > 0)
        c = "1" + c;
    HugeInteger r(c);
    return r;
}
HugeInteger operator+(HugeInteger h,int a)
{
    HugeInteger aa(a);
    HugeInteger b = h + aa;
    return b;
}
HugeInteger operator+( HugeInteger h, string a)
{
    HugeInteger aa(a);
    HugeInteger b = h + aa;
    return b;
}
ostream & operator << (ostream & os,const HugeInteger  a)
{
    os<<a.content; 
    return os;
}